/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.delogic.simuladorbancario.business;

import br.com.delogic.simuladorbancario.model.Cliente;
import br.com.delogic.simuladorbancario.model.UnidadeFederativa;
import java.util.ArrayList;
import java.util.List;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;

/**
 *
 * @author celio
 */
public class ClienteBusiness {
   
    private List clientes = new ArrayList();
    
    public void cadastrar(Cliente cliente){
        clientes.add(cliente);
    }
    
    public Cliente consultarPorCodigo(Integer codigo){
        for (Object c: clientes){
            Cliente cliente = (Cliente) c;
            if (cliente.getCodigo().equals(codigo)){
                return cliente;
            }
        }
        return null;
    }
    
}
